<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

    class User_model extends MY_Model
    {
        function check($username,$password)
        {
            $this->db->select('*');
            $this->db->from('admins');
            $this->db->where('username',$username);
            $this->db->where('password',MD5($password));
            $this->db->limit(1);
            
            $query = $this->db->get();
            
            if( $query->num_rows() == 1 )
            {
                return $query->result_array();
            }
            else
            {
                return false;
            }
            
        }
    }
?>
